<template>
  <transition name="silde-down">
    <div class="title-wrapper"
    v-show="menuVisible"
    >
      <div class="left">
        <span class="icon-back icon" @click = "back"></span>
      </div>
      <div class="right">
        <div class="icon-wrapper">
          <span class="icon-shelf icon"></span>
        </div>
        <div class="icon-wrapper">
          <span class="icon-cart icon"></span>
        </div>
        <div class="icon-wrapper">
          <span class="icon-more icon"></span>
        </div>
      </div>
    </div>
  </transition>
</template>

<script>
import { ebookMixin } from '../../utils/mixin.js'
export default {
  name: 'EbookTitle',
  mixins: [ebookMixin],
  methods: {
    back () {
      console.log('back')
    }
  }
}
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
@import "../../assets/styles/global";
  .title-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 101;
    display: flex;
    height: px2rem(48);
    background: white;
    box-shadow: 0 px2rem(8) px2rem(8) rgba(0,0,0,.15);
    .left {
      flex: 0 0 px2rem(60);
      margin-left: px2rem(15);
    }
    .right {
      flex: 1;
      display: flex;
      justify-content: flex-end;
      .icon-wrapper {
        flex: 0 0 px2rem(40);
        @include center;
      }
    }
  }
</style>
